package com.run.motion.service.impl;

import com.run.motion.entity.FoodDetail;
import com.run.motion.mapper.FoodDetailMapper;
import com.run.motion.service.IFoodDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tyx-qchk
 * @date 2022/12/6 14:02
 */
@Service
public class FoodDetailServiceImpl implements IFoodDetailService {
    @Autowired
    private FoodDetailMapper foodDetailMapper;
    @Override
    public FoodDetail selectFoodDetailById(String id) {
        return foodDetailMapper.selectFoodDetailById(id);
    }

    @Override
    public List<FoodDetail> selectFoodDetailByFoodName(String foodName) {
        return foodDetailMapper.selectFoodDetailByFoodName(foodName);
    }

    @Override
    public List<FoodDetail> selectFoodDetailList() {
        return foodDetailMapper.selectFoodDetailList();
    }

    @Override
    public List<FoodDetail> selectFoodDetailByTypeIdlList(String typeId) {
        return foodDetailMapper.selectFoodDetailByTypeIdlList(typeId);
    }

    @Override
    public int insertFoodDetail(FoodDetail foodDetail) {
        return foodDetailMapper.insertFoodDetail(foodDetail);
    }

    @Override
    public int updateFoodDetail(FoodDetail foodDetail) {
        return foodDetailMapper.updateFoodDetail(foodDetail);
    }

    @Override
    public int deleteFoodDetailById(String id) {
        return foodDetailMapper.deleteFoodDetailById(id);
    }

    @Override
    public int deleteFoodDetailByIds(String[] ids) {
        return foodDetailMapper.deleteFoodDetailByIds(ids);
    }
}
